<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="system.bean.Member"%>
<%@page import="system.bean.ModuleFile"%>
<%@page import="offer.system.GetMemberSource"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
ArrayList<ModuleFile> fileList = null;
if(null != request.getAttribute("fileList")){
	fileList = (ArrayList<ModuleFile>)request.getAttribute("fileList");
}

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>可被包含的文件列表</title>
	<meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>/css/index.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>/css/items.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>/css/subItems.css" />
    <script type="text/javascript"  src="<%=basePath%>js/getElementPos.js"></script>
    <script type="text/javascript"  src="<%=basePath%>js/coverLayer.js"></script>
    <script type="text/javascript"  src="<%=basePath%>jstree-v.pre1.0/_lib/jquery.js"></script>
    <script type="text/javascript"  src="<%=basePath%>js/StringUtil.js"></script>
  </head>
<body>
   <div class="itemTitle">
         公开 可被包含的文件列表
   </div>
  <form id="PublicFileManagerForm" action="PublicFileManagerServlet" method ="post"  onsubmit="return false" >
  <input type="hidden" id="def_sign_memberIds" name="def_sign_memberIds" value="" />
  <table align="center" cellspacing="0" cellpadding="0" border="0" width="99%" >
	 <tr>
	   <td colspan= 4 class="listTable_tr">
		   <span onclick="deletePublicFiles()" style="cursor:pointer;">
		      <img onclick="" class="buttonBcImg" width="20" src="<%=basePath %>images/delete.png" />删除可被包含文件
		   </span>
	   </td>
	 </tr>
	 <tr>
	    <td width="3%" class="listTable_headTr">&nbsp;</td>
	 	<td width="10%" class="listTable_headTr">序列号</td>
	 	<td width="10%" class="listTable_headTr">创建人</td>
	 	<td width="25%" class="listTable_headTr">文件名</td>
	 	<td width="32%" class="listTable_headTr">归档时间</td>
	 </tr>
	 
	 <% if ( null != fileList){
	 	ModuleFile file = null;
	 	Member member = null;
	    for(int i = 0 ; i < fileList.size() ; i++){
	    	file = (ModuleFile)fileList.get(i);
	    	member = GetMemberSource.getMemberById(file.getMemberId());
	     %>
	 <tr>
	   <td width="3%" class="listTable_tr"><input type="checkbox" value="<%=file.getFileId() %>" name="fileID"/></td>
	   <td width="15%" class="listTable_tr"><%=file.getSeqNo() %></td>
	   <td width="15%" class="listTable_tr"><%=member.getReal_name() %><%=member.getEmpNo() %></td>
	   <td width="15%" class="listTable_tr"><%=file.getFileName()%></td>
	   <td width="32%" class="listTable_tr"><%=file.getSignAuditTime() %></td>
	 </tr>
	 <%}
	   } %>
  </table>
  </form>
<script type="text/javascript">
  function deletePublicFiles(){
  	var fileIds = document.getElementsByName("fileID");
  	var i = 0;
  	for(; i < fileIds.length ; i++){
  		if(fileIds[i].checked){
  			break;
  		}
  	}
  	if(fileIds.length == i){
  		alert("请选择需要删除的文档！");
  		return ;
  	}
  	document.getElementById("PublicFileManagerForm").submit();
  }
</script>
  <div id="coverDiv" class="coverDiv"></div> <!-- 覆盖层，要放在所有弹出层之前 -->
</body>
</html>